<?php
/**
* phpCan - http://idc.anavallasuiza.com/
*
* phpCan is released under the GNU Affero GPL version 3
*
* More information at license.txt
*/

namespace data\formats;

defined('ANS') or die();

class Gmaps extends Formats implements iFormats {
	var $format = 'gmaps';

	public function check ($value) {
		$this->error = array();

		return $this->validate($value);
	}

	public function settings ($settings) {
		$this->settings = $this->setSettings($settings, array(
			'x' => array(
				'db_type' => 'decimal',

				'length_max' => '12,9',
				'value_max' => 180,
				'value_min' => -180,
				'default' => '0.000000000',
			),
			'y' => array(
				'db_type' => 'decimal',

				'length_max' => '12,9',
				'value_max' => 90,
				'value_min' => -90,
				'default' => '0.000000000',
			),
			'z' => array(
				'db_type' => 'tinyint',
				'db_unsigned' => true,

				'default' => 5,
				'length_max' => 2,
				'value_max' => 21,
				'default' => 5
			)
		));

		return $this->settings;
	}
}
?>
